﻿namespace LxCore
{
    public class MaterialLib : JsObject
    {
        public JsList<MaterialProperty> SolidMaterials { get; set; } = new JsList<MaterialProperty>()
            {
                GetSolidDefault(),

            };
        public JsList<MaterialProperty> FluidMaterials { get; set; } = new JsList<MaterialProperty>()
            {
                GetFluidDefault(),
            };
        public static MaterialProperty GetSolidDefault()
        {
            return new MaterialProperty()
            {
                Name = "铝",
                Density = new ConstField.Double(2700),
                SpecificHeat = new ConstField.Double(900),
                ThermalConductivity = new ConstField.Double(200),
            };
        }

        public static MaterialProperty GetFluidDefault()
        {
            return new MaterialProperty()
            {
                Name = "空气",
                Density = new ConstField.Double(1.2),
                ThermalConductivity = new ConstField.Double(0.026),
                SpecificHeat = new ConstField.Double(1000),
                Viscosity = new ConstField.Double(1.8e-5),
                ThermalExpansionCoefficent = new ConstField.Double(0.0033),
            };
        }

    }
}
